package com.yxym.homework03;

public class Manager extends Employee{
    //特有属性
    private double bonus;

    public Manager(String name, double dailySalary, int days, double grade) {
        super(name, dailySalary, days, grade);
    }

   public double getBonus(){
        return bonus;
   }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
    //重写父类的打印方法,加入bonus属性
    @Override
    public void printSalary() {
        System.out.println(getName() + "经理" + "\t" + "工资：" +
                (getDailySalary() * getDays() * getGrade() + getBonus()));
    }
}
